package com.example.home.adapter

import androidx.coordinatorlayout.widget.CoordinatorLayout.Behavior
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

class HomeFragmentAdapter constructor(private val list: MutableList<Fragment>,fm : FragmentManager,behavior: Int ): FragmentPagerAdapter(fm,behavior) {

    private val tabsList = mutableListOf<String>("发现","推荐","最新")

    override fun getCount(): Int =list.size

    override fun getItem(position: Int): Fragment =list[position]

    override fun getPageTitle(position: Int): CharSequence? {
        return tabsList[position]
    }


}